﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ManageRoles.aspx.cs" Inherits="WebRSSBuilder.ASP.ManageRoles" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
        }
        .style2
        {
            width: 116px;
        }
        .style3
        {
            width: 236px;
        }
        .style4
        {
            width: 116px;
            height: 29px;
        }
        .style5
        {
            width: 236px;
            height: 29px;
        }
        .style6
        {
            height: 29px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 <!--<asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                &nbsp;
                &nbsp;
                &nbsp;
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
               <ContentTemplate>-->
    <table style="width: 60%; " align="center">
        <tr>
            <td align="center" colspan="3">
               
                <asp:Label ID="Label1" runat="server" CssClass="Labeltitle" Text="Manage Roles"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style2">
              <strong>Add Role</strong>
            </td>
            <td class="style3">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style4">
                &nbsp;&nbsp;
                <asp:Label ID="Label3" runat="server" Text="Role Name"></asp:Label>
            </td>
            <td class="style5">
                <asp:TextBox ID="TextBoxRoleName" runat="server" Height="21px" Width="193px"></asp:TextBox>
&nbsp;</td>
            <td class="style6">
                &nbsp;
                <asp:Button ID="ButtonAddRole" runat="server" Text="Add" Height="26px" 
                    onclick="ButtonAddRole_Click" Width="64px" CssClass="ButtonSave" />
            </td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td class="style3">
                <asp:Label ID="LabelError" runat="server" ForeColor="#CC3300" 
                    Text="This role already exists " Visible="False"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="center" class="style1" colspan="3">
                <asp:Label ID="LabelDeleteError" runat="server" ForeColor="#CC3300" 
                    
                    Text="The Role can't be deleted, please delete any files related to this role before" 
                    Visible="False"></asp:Label>
                &nbsp;
                &nbsp;
                <br />
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    DataKeyNames="RoleId" DataSourceID="LinqDataSource1" CellPadding="4" 
                    ForeColor="#333333" GridLines="None" Width="279px">
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <Columns>
                        <asp:CommandField ShowDeleteButton="True" />
                        <asp:BoundField DataField="RoleName" HeaderText="RoleName" 
                            SortExpression="RoleName" >
                        <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                    </Columns>
                    <EditRowStyle BackColor="#999999" />
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
                <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                    ContextTypeName="WebRSSBuilder.ASP.SourceDataContext" EnableDelete="True" 
                    EnableInsert="True" EntityTypeName="" TableName="aspnet_Roles" ondeleted="LinqDataSource1_Deleted" 
                   >
                </asp:LinqDataSource>
                &nbsp;
            </td>
        </tr>
    </table>
    <!--</ContentTemplate>
    </asp:UpdatePanel>-->
</asp:Content>
